Skip to content

Remove status emojis from help channels to prevent us from hitting rate limits#966

Merged
jb3 merged 2 commits into
masterfrom
sebastiaan/help-channels/ratelimits
May 29, 2020
Merged

Remove status emojis from help channels to prevent us from hitting rate limits#966
jb3 merged 2 commits into
masterfrom
sebastiaan/help-channels/ratelimits

Conversation

@SebastiaanZ
Copy link
Copy Markdown
Contributor

Discord has introduced new, strict rate limits for editing the names and topics of individual channels: You may only change the topic/name twice per 10 minutes per channel.

Unfortunately, our help channel system frequently goes over that rate limit as it edits the name and topic of a channel on all three "move" actions we have: to available, to occupied, and to dormant. In addition, our "unanswered" feature adds another channel name change on top of the move-related edits.

That's why I've removed the topic/emoji changing features from the help channel system. This means we now have a generic topic that fits all three categories and no status emojis in the channel names.

Note: The get_clean_channel_name method has been left in place, but can be removed once we've ensures that all the help channels have "clean" names without emojis. We can't really do this beforehand, as the bot keeps adding them until this change is merged.

The `check_for_answer` method of the HelpChannels cog relies on the
channel->claimant cache being available. However, as this cache is
(currently) lost during bot restarts, this method may fail with a
KeyError exception.

I've used `dict.get` with an `if not claimant: return` to circumvent
this issue.
Discord has introduced a new, strict rate limit for individual channel
edits that reduces the number of allow channel name/channel topic
changes to 2 per 10 minutes per channel.

Unfortunately, our help channel system frequently goes over that rate
limit as it edits the name and topic of a channel on all three "move"
actions we have: to available, to occupied, and to dormant. In addition,
our "unanswered" feature adds another channel name change on top of
the move-related edits.

That's why I've removed the topic/emoji changing features from the help
channel system. This means we now have a generic topic that fits all
three categories and no status emojis in the channel names.
@SebastiaanZ SebastiaanZ added t: bug Something isn't working p: 0 - critical Needs to be addressed ASAP status: needs review a: help channels Related to the help channel system labels May 29, 2020
@SebastiaanZ SebastiaanZ requested a review from a team as a code owner May 29, 2020 18:20
@SebastiaanZ SebastiaanZ requested review from manusaurio and sco1 and removed request for a team May 29, 2020 18:20
Copy link
Copy Markdown
Member

@jb3 jb3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. If Discord rollback on this we can revert the commit.

Copy link
Copy Markdown
Member

@Den4200 Den4200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jb3 jb3 merged commit dd11ba4 into master May 29, 2020
@jb3 jb3 deleted the sebastiaan/help-channels/ratelimits branch May 29, 2020 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: help channels Related to the help channel system p: 0 - critical Needs to be addressed ASAP t: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants